<template>
	<div v-show='breadcrumbItems.length>1'  class='breadNav'>
		您当前所在的位置：<a-breadcrumb  separator=">"  :routes="breadcrumbItems"  class='inline-block'> 
						    <template slot="itemRender" slot-scope="{route, params, routes, paths}">
							        <span v-if="routes.indexOf(route) === routes.length - 1">
							          {{route.title}}
							        </span>
							        <router-link v-else :to="route.path">
							          {{route.title}}
							        </router-link>
						    </template>
						</a-breadcrumb>  
	</div> 
</template>

<script >
import { mapGetters }  from 'vuex'
	export default {
		name:'breadcrumbs',
		props:{
			// route:{
			// 	type:Object,
			// 	default:()=>{}
			// },
			 
		},
		data(){
			return {
				breadLength:null,	
			}
		},
		created(){
			console.log(this.breadcrumbItems)
		},
		methods:{
			
		},
		computed:{
			...mapGetters(['breadcrumbItems'])
		}
	}
</script>

<style scoped="scoped">
	.breadNav{width: 1200px;margin:0 auto;padding-top: 20px;}
</style>